<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ include file="../taglibs.jsp" %>
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">

    <title> - 登录</title>
    <meta name="keywords" content="">
    <meta name="description" content="">
    <link href="${path}/static/front/css/bootstrap.min.css" rel="stylesheet">
    <link href="${path}/static/front/css/font-awesome.css?v=4.4.0" rel="stylesheet">
    <link href="${path}/static/front/css/animate.css" rel="stylesheet">
    <link href="${path}/static/front/css/style.css" rel="stylesheet">
    <link href="${path}/static/front/css/login.css" rel="stylesheet">

    <script>
        if (window.top !== window.self) {
            window.top.location = window.location;
        }
    </script>

</head>

<body class="signin" style="background-image: url(${path}/static/front/images/login-background.jpg)">
    <div class="signinpanel">
        <div class="row">
            <div class="col-sm-12">
                <form id="login_form" action="javascript:;">
                    <h4 class="no-margins">登录：</h4>
                    <p class="m-t-md">登录到H+后台主题UI框架</p>
                    <input name="username" type="text" class="form-control uname" placeholder="用户名" />
                    <input name="password" type="password" class="form-control pword m-b" placeholder="密码" />
                    <a href="">忘记密码了？</a>
                    <input type="submit" onclick="submitForm()" name="" value="登录" class="btn btn-success btn-block" >
                </form>
            </div>
        </div>
        <div class="signup-footer">
            <div class="pull-left">
                &copy; hAdmin
            </div>
        </div>
    </div>
    
    <script type="text/javascript" src="${path}/static/front/js/jquery-1.12.4.min.js"></script>
	<script type="text/javascript" src="${path}/static/front/js/jquery-ui.min.js"></script>
	<script type="text/javascript" src="${path}/static/front/js/slide.js"></script>
	<script src="${path}/static/lib/jquery-1.11.3.js"></script>
	<script src="${path}/static/lib/mylayer.js"></script>
	<script src="${path}/static/lib/util.js"></script>
	<script src="${path}/static/lib/layui/layui.js"></script>
    
    <script type="text/javascript">
	
	layui.use(['layer'], function(){
		  var layer = layui.layer;
	});
	
	function submitForm() {
	
		$.ajax({
			url: "${path}/user/login.shtml",
			data: $("#login_form").serialize(),
			type: "post",
			dataType: "json",
			success: function(jsonObj) {
				if (jsonObj.code == 0) {
					mylayer.successMsgUrl(jsonObj.msg,"${path}/index/getIndexPage.action");
				} else {
					mylayer.errorMsg(jsonObj.msg);
				}
			}
		});
	}
	</script>
    
</body>

</html>
